<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>地图展示</title>
</head>
<body>
    <div id="map" style="width: 500px; height: 350px; border: solid;" >地图展示</div>
</body>
</html>
<script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=jBhtftnoivHwS5EypucQkZWaomEIuQcN"></script>
<script>
    var map = new BMap.Map("allmap");
    var point = new BMap.Point(116.40387397,39.91488908);
    map.centerAndZoom(point,12);
        var pt = e.point;
        geoc.getLocation(pt, function(rs){
            var addComp = rs.addressComponents;
            alert(addComp.province + ", " + addComp.city + ", " + addComp.district + ", " + addComp.street + ", " + addComp.streetNumber);
        });        
    });
</script>